function T = dynamic_resid_tt(T, y, x, params, steady_state, it_)
% function T = dynamic_resid_tt(T, y, x, params, steady_state, it_)
%
% File created by Dynare Preprocessor from .mod file
%
% Inputs:
%   T             [#temp variables by 1]     double  vector of temporary terms to be filled by function
%   y             [#dynamic variables by 1]  double  vector of endogenous variables in the order stored
%                                                    in M_.lead_lag_incidence; see the Manual
%   x             [nperiods by M_.exo_nbr]   double  matrix of exogenous variables (in declaration order)
%                                                    for all simulation periods
%   steady_state  [M_.endo_nbr by 1]         double  vector of steady state values
%   params        [M_.param_nbr by 1]        double  vector of parameter values in declaration order
%   it_           scalar                     double  time period for exogenous variables for which
%                                                    to evaluate the model
%
% Output:
%   T           [#temp variables by 1]       double  vector of temporary terms
%

assert(length(T) >= 35);

T(1) = params(23)*(y(36)*y(21))^(1-params(1));
T(2) = (y(30)*y(4))^params(1);
T(3) = (1-params(6))/params(6);
T(4) = y(11)^params(6);
T(5) = (1-y(21))^(1-params(6));
T(6) = (1-params(9))/params(12);
T(7) = 1/params(12);
T(8) = params(24)*(y(10)*T(4)*T(5))^T(6)+params(2)*y(17)^T(7);
T(9) = params(12)/(1-params(9));
T(10) = params(8)/2;
T(11) = 1-y(13)-T(10)*(y(18)/y(4)-params(3))^2;
T(12) = y(10)/y(1);
T(13) = T(4)*T(5);
T(14) = T(12)*T(13);
T(15) = y(2)^params(6);
T(16) = (1-y(5))^(1-params(6));
T(17) = T(15)*T(16);
T(18) = T(14)/T(17);
T(19) = params(2)*T(18)^T(6);
T(20) = y(2)/y(11);
T(21) = y(32)^(1-params(9));
T(22) = T(21)/y(3);
T(23) = T(22)^(1-T(7));
T(24) = y(41)^(-1);
T(25) = y(23)/params(38);
T(26) = y(35)/y(8);
T(27) = params(7)/2*(T(25)-1)^2;
T(28) = y(39)/y(19);
T(29) = 1-y(38)-T(10)*(T(28)-params(3))^2+T(28)*params(8)*(T(28)-params(3));
T(30) = y(44)*(y(45)*y(43)+y(42)*T(29));
T(31) = y(41)/params(38);
T(32) = y(47)/y(35);
T(33) = y(44)*params(7)*(T(31)-1)*T(32);
T(34) = (y(37)+y(40))^2;
T(35) = y(22)^2;

end
